package com.example.spinning.mapper;

import com.example.spinning.bean.OutStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OutStockMapper {

    //得到出货单
    List<OutStock> getOutStock(@Param("start") Integer start, @Param("count") Integer count);

    //查找表的行数
    int getCountOutStock();

    //根据名字查找表的行数
    int getCountOutStockByCondition(
            @Param("date") String date,
            @Param("receiver") String receiver,
            @Param("norms") String norms,
            @Param("batch_no") String batch_no);

    //根据id查找产品
    OutStock getOutStockById(Long id);

    //根据品名查询入库单
    List<OutStock> getOutStockByCondition(
            @Param("start") Integer start,
            @Param("count") Integer count,
            @Param("date") String date,
            @Param("receiver") String receiver,
            @Param("norms") String norms,
            @Param("batch_no") String batch_no);

    //增加
    int addOutStock(OutStock outStock);

    //修改
    int updateOutStockById(OutStock outStock);

    //删除
    int delOutStockById(@Param("ids") String[] ids);


}
